package aries.database;

/******************************************************************************
 * You may modify, publish, and use Aries for your own purpose. BUT
 * DON'T REMOVE THIS TEXT.
 * Visit my facebook: http://www.facebook.com/freeskies or
 * Follow my twitter: @freeskys
 *
 *
 * Author: Harditya Rahmat Ramadhan
 * Licence: GPLv2
 *****************************************************************************/

public class DatabaseMapping {
   
    /**
     * Table variable.
     */
    private Table table;

    /**
     * Set the table.
     * 
     * @param table 
     */
    public void setTable(Table table) {
        this.table = table;
    }
    
    /**
     * Get the table.
     * 
     * @return Table
     */
    public Table getTable() {
        return this.table;
    }
    
    /**
     * Get the table string.
     * 
     * @return Table
     */
    public String getTableString() {
        return this.table.getTable();
    }
    
    /**
     * Get the field.
     * 
     * @return Field
     */
    public Field getField() {
        return new Field(this.table.getFieldString(), this.table.getTypeString(), this.table.getLengthString());
    }
    
    /**
     * Get the field.
     * 
     * @return String[]
     */
    public String[] getFieldString() {
        return this.table.getFieldString();
    }
    
    /**
     * Get the type.
     * 
     * @return String[]
     */
    public String[] getTypeString() {
        return this.table.getTypeString();
    }
    
    /**
     * Get the length.
     * 
     * @return String[]
     */
    public String[] getLengthString() {
        return this.table.getLengthString();
    }
    
    /**
     * Add field into the table.
     */
    public void addField(Field field) {
        this.table.addField(field);
    }
    
}
